Fixed the garbage _tx_initialize_unused_memory in the GNU Cortex-A ports - #726
Merged
Merged
Conversation
…level initialization, so _tx_initialize_unused_memory now holds the first free address instead of garbage __top_of_ram is a linker-defined symbol whose address is the value of interest, so LDR x1, =__top_of_ram already loads the top of RAM. The following LDR x1, [x1] read whatever happened to be stored there and handed that garbage to _tx_initialize_unused_memory. The Arm Compiler ports are not affected: they load a literal .quad that holds the address, so the dereference is correct there. The SMP GNU ports already had the correct form; this aligns the remaining GNU ports with them. Assisted-by: Copilot (Opus 5) <noreply@github.com>
This was referenced Sep 10, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #435
LDR x1, =__top_of_ramalready loads the top of RAM, so theLDR x1, [x1]that followed read whatever sat at that address and left
_tx_initialize_unused_memoryholding garbage.Dropped that instruction from the 13 non-SMP GNU Cortex-A ports, the ARMv8-A
source they are generated from, and the two Cortex-A35 module examples. The SMP
GNU ports already had the correct form, and the Arm Compiler ports are
unaffected -- their symbol really does need the dereference.
scripts/check_ports.shpasses and thegnuCI job build-verifies the AArch64ports. Not run on hardware.